package com.example.demo.design.demo21_singleton;

/**
 * Created by 蔡超 on 2018/10/8.
 */
public class ThreadTest extends Thread {
    public static int num = 0;
    @Override
    public void run() {
        Singleton singleton = null;
        try {
            singleton = Singleton.getInstance2();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("num: " + (num +1)+ " ;" + singleton.hashCode());
        num ++;
    }
}
